package cn.bdqn.entity;

import lombok.Data;

@Data
public class MyEntity {
    //状态码
    private int code;
    //返回数据
    private Object data;
    //信息
    private String msg;

    public static MyEntity ok(Object param ) {
        MyEntity my = new MyEntity();
        my.setCode(200);
        my.setMsg("成功");
        my.setData(param);
        return my;
    }
    public static MyEntity fail(Object param,int code,String msg) {
        MyEntity my = new MyEntity();
        my.setCode(code);
        my.setMsg(msg);
        my.setData(param);
        return my;
    }
}
